/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class SoilSensor {
    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device || {};
        this.opts = opts || {};
        this._to = to;
    }

    get categoryCode() {
        return '020010004';
    }

    get categoryName() {
        return '\u571f\u58e4\u4f20\u611f\u5668';
    }

    getHumidity(params) {
        return command({
            method: 'getHumidity',
            methodId: 'pGseXQ1Z',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getNitrogen(params) {
        return command({
            method: 'getNitrogen',
            methodId: 'pex0JzNC',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getPh(params) {
        return command({
            method: 'getPh',
            methodId: 'pZKCf6Ed',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getPhosphorus(params) {
        return command({
            method: 'getPhosphorus',
            methodId: 'ppOcvgOA',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getPotassium(params) {
        return command({
            method: 'getPotassium',
            methodId: 'pUXSye5r',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTemperature(params) {
        return command({
            method: 'getTemperature',
            methodId: 'p1bDlB3L',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default SoilSensor;
